<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            * {
                padding: 0px;
                margin: 0px;
            }

            div {
                width: 100px;
                height: 100px;
                position: absolute;
            }

            .d1 {
                background: red;
                top: 200px;
                left: 0px;

                /*设置元素的堆叠顺序,值越大，优先级越高*/
                /*对于position:static的元素是无效的*/
                z-index:19;
            }

            .d2 {
                background: green;
                top: 200px;
                left: 0px;
                z-index:999;
            }

            .d3 {
                background: yellow;
                top: 200px;
                left: 0px;
            }

            .d4 {
                background: pink;
                top: 200px;
                left: 0px;
                z-index:9;
            }

            .d5 {
                background: lightgreen;
                top: 200px;
                left: 0px;
            }
        </style>
    </head>
    <body>
        <div class="d1"></div>
        <div class="d2"></div>
        <div class="d3"></div>
        <div class="d4"></div>
        <div class="d5"></div>
    </body>
</html>